package com.freeter.common.enums;

/**
 * 性别（1男、2女、3未知）
 */
public enum SexEnum {
    MALE("男",1), WOMAN("女",2),UNKOWN("未知",3);

    private final String name;
    private final int code;

    SexEnum(String name, int code) {
        this.name = name;
        this.code = code;
    }
    public static String getName(int code){
        for( SexEnum st : SexEnum.values()){
            if(st.code == code){return st.name;}
        }
        return "";
    }
}
